import Mock from 'mockjs'

import {filePaths} from './propertyPanelPath/index'

Mock.mock('/api/propertyPanelPath','post',options => {
  // const type = options.url.split('?type=')[1]
  var type = JSON.parse(options.body).type
  // console.log(type)
  let filePath = filePaths.filter(item => {
    return item.type == type
  })
  let data = {
    ...filePath[0]
    // config:filePath[0].config,
    // fileName:filePath[0].fileName,
    // filePath:filePath[0].filePath
  }
  return data
})